package com.lz.serializable;

import com.dslplatform.json.DslJson;
import com.dslplatform.json.JsonReader;
import com.dslplatform.json.JsonWriter;

import java.io.IOException;
import java.io.Serializable;

/**
 * DSLJson..
 *
 * @author Lizhong
 * @date 2019/3/7
 */
public class DSLJson {
    public static void main(String[] args) throws IOException {
        //language=JSON
        String jison="{\"name\":\"zhangsan\",\"age\":18}";
        //language=MySQL
        String sql= "select  * from user where id=1";
        //language=HTML
        String  other = "<h1>hello,world</h1>";
        User 张三 = new User("1", "张三");
        DslJson dslJson =new DslJson();
        JsonWriter writer = new JsonWriter();

        dslJson.serialize(writer,张三);
        JsonReader jsonReader = dslJson.newReader();
    }
}
class User implements Serializable {
    private String name;
    private String age;

    public User(String name, String age) {
        this.name = name;
        this.age = age;
    }

    public User() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }
}
